//
//  DateExtension.swift
//  DongBaoDemo
//
//  Created by 陈志勇 on 2018/8/5.
//  Copyright © 2018年 陈志勇. All rights reserved.
//

import Foundation

extension Date {
    func toString(dateFormat: String) -> String {
        let dateFormatter = DateFormatter()
        dateFormatter.dateFormat = dateFormat
        return dateFormatter.string(from: self)
    }
}
